﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reactive;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace FasterWPF
{
    public static class KeyboardHelper
    {
        static bool AltKeyPressed = false;

        public static Key GetKeyPressedInCombinatinWithAltKey(KeyEventArgs e)
        {
            Key keyPressedInCombinationWithAlt = 0;

            if (AltKeyPressed)
            {
                AltKeyPressed = false;

                keyPressedInCombinationWithAlt = e.SystemKey;
            }

            if (e.SystemKey == Key.LeftAlt || e.SystemKey == Key.RightAlt)
            {
                AltKeyPressed = true;
            }

            return keyPressedInCombinationWithAlt;
        }
       
    }//end of class
}//end of namespace
